package com.erp.Struts.Action;

import com.erp.Struts.common.Constants;
import com.erp.hibernate.beans.Storage;
import com.erp.hibernate.dao.StorageDAO;

public class StorageAction extends PageAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = -5525659152183818352L;
	private StorageDAO storageDAO;
	private Storage storage;
	
	public String init() throws Exception{
		super.pageSize = Constants.pageSize;
		super.pageNo = Constants.pageNo;
		super.pager = this.getStorageDAO().findPager(super.pageSize, super.pageNo);
		setSession(Constants.PAGER_INBILL, super.pager);
		return Constants.LIST_KEY;
	}
	
	public String list() throws Exception{
		super.pager = this.getStorageDAO().findPager(super.pageSize, super.pageNo);
		setSession(Constants.PAGER_INBILL, super.pager);
		return Constants.LIST_KEY;
	}

	public StorageDAO getStorageDAO() {
		return storageDAO;
	}

	public void setStorageDAO(StorageDAO storageDAO) {
		this.storageDAO = storageDAO;
	}

	public Storage getStorage() {
		return storage;
	}

	public void setStorage(Storage storage) {
		this.storage = storage;
	}
}
